Skip to content

fix daemon HyperFrames scaffold and runtime - #7030

Merged
AmyShang-alt merged 7 commits into
mainfrom
agent/fix-hyperframes-runtime
Aug 19, 2026
Merged

fix daemon HyperFrames scaffold and runtime#7030
AmyShang-alt merged 7 commits into
mainfrom
agent/fix-hyperframes-runtime

Conversation

@Siri-Ray

Copy link
Copy Markdown
Contributor

Why

HyperFrames creation could fail before hyperframes.json existed because both project setup and rendering delegated runtime selection to an ambient npx installation. On Apple Silicon, a stale or incompatible native sharp artifact in the user npm cache caused initialization to exit early; the daemon then correctly rejected the directory as an incomplete HyperFrames project.

The author use case is making in-app HyperFrames generation reliable in development and packaged builds without depending on a user's npm cache, global skill installation, or PATH-selected CLI.

What users will see

  • HyperFrames tasks create a deterministic hidden composition scaffold through Open Design.
  • Rendering uses the HyperFrames CLI version pinned and packaged with the daemon instead of invoking npx.
  • Working composition files remain under .hyperframes-cache; the final MP4 remains the only project-root deliverable.
  • The same scaffold capability is available through the daemon API and od media scaffold --json.

Surface area

  • UI
  • Keyboard shortcut
  • CLI / env var
  • API / contract
  • Extension point
  • i18n keys
  • New top-level dependency
  • Default behavior change
  • None

Screenshots

Not applicable — this PR does not change the UI.

Bug fix verification

  • Red: the renderer regression reproduced spawn npx ENOENT when no ambient npx was available, proving rendering still depended on external CLI resolution.
  • Green: apps/daemon/tests/media/hyperframes.test.ts now verifies the pinned Node/CLI invocation without npx.
  • New scaffold helper, authenticated route, CLI, prompt, runtime-env, server-bootstrap, and packaged-dependency regressions cover the complete setup-to-render boundary.

Validation

  • pnpm install --frozen-lockfile
  • pnpm guard
  • pnpm typecheck
  • daemon focused Vitest: 8 files, 100 tests passed
  • tools-pack Vitest: 38 files, 279 passed, 8 skipped
  • generated scaffold HyperFrames lint: 0 errors, 0 warnings
  • real MP4 smoke reached the FFmpeg preflight; this machine does not currently have FFmpeg/FFprobe installed, so final encoding was not claimed as completed

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🚀 Landing page preview

This PR is deployed to a Cloudflare Pages preview — not staging or production:

…-runtime

# Conflicts:
#	apps/daemon/src/server.ts
#	apps/daemon/tests/prompts/__snapshots__/system-prompt-matrix.test.ts.snap
#	design-templates/hyperframes/references/html-in-canvas.md
#	plugins/_official/examples/hyperframes/references/html-in-canvas.md
@lefarcen
lefarcen requested a review from nettee August 18, 2026 07:35
@lefarcen lefarcen added size/XXL PR changes 1500+ lines risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps type/bugfix Bug fix labels Aug 18, 2026
@Siri-Ray
Siri-Ray marked this pull request as ready for review August 18, 2026 07:55
@Siri-Ray
Siri-Ray requested a review from a team as a code owner August 18, 2026 07:55
@lefarcen lefarcen added the needs-validation Runtime change detected; needs human or /explore agent validation. label Aug 18, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

Quick heads-up: this PR touches user-visible daemon/CLI runtime behavior, so it will need a manual QA pass before merge — please hold off self-merging for now; we'll loop QA in once it's merge-ready.

Also, could you update the PR body's Surface area checklist? The rest of the write-up is clear, but that section should reflect the CLI/API/extension-point/default-behavior changes called out elsewhere in the description.

1 similar comment
@lefarcen

Copy link
Copy Markdown
Contributor

Quick heads-up: this PR touches user-visible daemon/CLI runtime behavior, so it will need a manual QA pass before merge — please hold off self-merging for now; we'll loop QA in once it's merge-ready.

Also, could you update the PR body's Surface area checklist? The rest of the write-up is clear, but that section should reflect the CLI/API/extension-point/default-behavior changes called out elsewhere in the description.

@mrcfps

mrcfps commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

@Siri-Ray I'm holding off on generating review comments for #7030 because this pull request has merge conflicts right now.

Please resolve the conflicts with main and push the updated branch. Once that's done, request or wait for the review to run again and I'll take another look.

🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos.

Generated-By: looper 0.11.8 (runner=fixer, agent=codex)
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Visual regression review

Head: e909342 · Base: 67576cb

0 changed · 49 unchanged · 0 new without baseline · 0 failed

Unchanged cases
Case Main PR Diff
visual-avatar-local-agent-list
0 px (0.00%)
main pr diff
visual-avatar-local-agent-list-panel
0 px (0.00%)
main pr diff
visual-avatar-menu
0 px (0.00%)
main pr diff
visual-avatar-menu-panel
0 px (0.00%)
main pr diff
visual-avatar-open-design-model-picker
0 px (0.00%)
main pr diff
visual-critical-settings
0 px (0.00%)
main pr diff
visual-critical-workspace
0 px (0.00%)
main pr diff
visual-critical-workspace-preview
0 px (0.00%)
main pr diff
visual-design-system-detail
0 px (0.00%)
main pr diff
visual-design-systems
0 px (0.00%)
main pr diff
visual-home
0 px (0.00%)
main pr diff
visual-home-catalog
0 px (0.00%)
main pr diff
visual-home-context-picker
0 px (0.00%)
main pr diff
visual-home-context-picker-popover
0 px (0.00%)
main pr diff
visual-home-plugin-filter
0 px (0.00%)
main pr diff
visual-home-plugin-use-staged
0 px (0.00%)
main pr diff
visual-home-plugin-use-with-query
0 px (0.00%)
main pr diff
visual-home-staged-attachment
0 px (0.00%)
main pr diff
visual-integrations
0 px (0.00%)
main pr diff
visual-integrations-mcp
0 px (0.00%)
main pr diff

Visual diff is advisory only and does not block merging.

@Siri-Ray Siri-Ray added the backport release/v0.20.0 Backport this fix to release/v0.20.0 label Aug 18, 2026
@mrcfps

mrcfps commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

@Siri-Ray I'm holding off on generating review comments for #7030 because this pull request has merge conflicts right now.

Please resolve the conflicts with main and push the updated branch. Once that's done, request or wait for the review to run again and I'll take another look.

🔁 Powered by Looper · runner=reviewer · agent=opencode · An autonomous AI dev team for your GitHub repos.

Generated-By: looper 0.11.8 (runner=fixer, agent=codex)

@AmyShang-alt AmyShang-alt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Siri-Ray

Thanks for the contribution. I completed packaged-runtime QA for this PR. I am requesting changes because the final macOS arm64 app cannot load the bundled HyperFrames CLI; the inline comment includes the isolated-package reproduction and required follow-up.

Comment thread tools/pack/src/mac-prebundle.ts
@lefarcen

Copy link
Copy Markdown
Contributor

Hey @Siri-Ray — packaged-runtime QA has now identified the current blocker on this head: the bundled HyperFrames CLI is still missing its native sharp dependency closure in the final packaged app, so the packaged smoke path fails before render.

The concrete repro and expected follow-up are already captured in @AmyShang-alt's blocking review comment above, so the next step is to fix that packaged payload path and push an updated head for QA to re-run.

💡 To drive this PR to merge hands-free, paste this to your AI coding agent (Claude Code / Codex / opencode / Cursor …):
Take over nexu-io/open-design#7030 until it merges — read https://raw.githubusercontent.com/nexu-io/looper/main/skills/pr-takeover/SKILL.md and follow it.

Copy the target-native sharp closure into final standalone payloads and execute the packaged HyperFrames CLI during afterPack.

Generated-By: looper 0.11.8 (runner=fixer, agent=codex)
@Siri-Ray

Copy link
Copy Markdown
Contributor Author

Looper fixer round completec1ea0fb

  • ✅ Review comment on tools/pack/src/mac-prebundle.ts:29 (@AmyShang-alt) — thread
    • Added sharp to the macOS and Windows prebundle maps, restored its platform-native closure after pruning, and made afterPack execute HyperFrames from the final packaged app. A real macOS build now contains 17,777,811 libvips bytes and reports HyperFrames 0.8.1.

🔁 Powered by Looper · runner=fixer · agent=codex · An autonomous AI dev team for your GitHub repos.

Only chmod the copied fallback so a successful hard link does not try to change the CI-owned Node inode.

Generated-By: looper 0.11.8 (runner=fixer, agent=codex)

@open-design-crew open-design-crew Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA accepted on head e909342.

The previous packaged-runtime blocker is resolved:

  • The final macOS app contains sharp and its Darwin ARM64/libvips native runtime closure.
  • The packaged HyperFrames CLI reports 0.8.1 and passes lint in an isolated environment without ambient npx.
  • A real packaged render completed successfully (H.264, 1920x1080, 1 second).
  • Focused tools-pack tests: 39 passed.
  • Focused daemon/HyperFrames tests: 8 passed.
  • Required GitHub checks are green, including Windows tools-pack payload coverage.

Residual sampling recommendation: run one full installed-package render on Windows before release. This is non-blocking for this PR.

@open-design-crew open-design-crew Bot added validated Runtime change validated (via /explore Pass or manual QA). and removed needs-validation Runtime change detected; needs human or /explore agent validation. labels Aug 19, 2026
@AmyShang-alt
AmyShang-alt dismissed their stale review August 19, 2026 03:11

The reported packaged sharp dependency blocker was fixed on head e909342 and revalidated with a real isolated packaged render. Superseded by QA approval review #4968060456.

@AmyShang-alt
AmyShang-alt added this pull request to the merge queue Aug 19, 2026
@lefarcen

Copy link
Copy Markdown
Contributor

All gates look green now — this looks ready for maintainer merge. Thanks @Siri-Ray + @nettee!

Merged via the queue into main with commit 0d53c96 Aug 19, 2026
34 checks passed
@open-design-release-bot

Copy link
Copy Markdown
Contributor

Created backport PR for release/v0.20.0:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-7030-to-release/v0.20.0
git worktree add --checkout .worktree/backport-7030-to-release/v0.20.0 backport-7030-to-release/v0.20.0
cd .worktree/backport-7030-to-release/v0.20.0
git reset --hard HEAD^
git cherry-pick -x 0d53c96bebb6caa4e23fdcc0f1c256b7f26e033c
git push --force-with-lease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/v0.20.0 Backport this fix to release/v0.20.0 risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps size/XXL PR changes 1500+ lines type/bugfix Bug fix validated Runtime change validated (via /explore Pass or manual QA).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants